<div class="documents form">
<?php echo $this->Form->create('Document', array('type' => 'file'));
$loggedUser = $this->Session->read('Auth.User');?>
	<fieldset>
		<legend><?php echo __('Upload a document'); ?></legend>
	<?php
		echo $this->Form->hidden('user_id', array('default' => $loggedUser['id']));
		echo $this->Form->hidden('uploader', array('default' => $loggedUser['id']));
		echo $this->Form->input('file', array('type' => 'file'));
		echo $this->Form->input('title');
		echo $this->Form->input('description');
		echo $this->Form->radio('view_permissions', array('0'=>'Personal and private','1' => 'Personal and public', '2' => 'Family and private', '3' => 'Family and public'));

	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Documents'), array('action' => 'index')); ?></li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
	</ul>
</div>
